package cn.springboot.erp.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName shipments
 */
@TableName(value ="shipments")
@Data
public class Shipments implements Serializable {
    /**
     * 发货单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单ID，关联销售订单表
     */
    @TableField(value = "order_id")
    private Integer orderId;

    /**
     * 发货日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "shipment_date")
    private Date shipmentDate;

    /**
     * 物流单号
     */
    @TableField(value = "tracking_number")
    private String trackingNumber;

    /**
     * 发货状态:0运输中，1已完成
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 发货备注
     */
    @TableField(value = "note")
    private String note;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}